export const GET_PLAYLIST = 'GET_PLAYLIST';
export const SET_PLAYLIST = 'SET_PLAYLIST';
export const CLEAR_PLAYLIST = 'CLEAR_PLAYLIST';

export const OPEN_PLAYLIST = 'OPEN_PLAYLIST';

// ** get user playList
export const getPlayList = (data) => {

  return (dispatch, getState) => {
    dispatch({
      type: GET_PLAYLIST,
      data,
    });
  };
};

// ** Add new playList
export const addPlayList = (playList) => {
  return (dispatch, getState) => {
    dispatch({
      type: SET_PLAYLIST,
      data: playList,
    });
  };
};

// ** clear playList
export const clearPlayList = () => {
  return async (dispatch) => {
    dispatch({
      type: CLEAR_PLAYLIST,
    });
  };
};

// ** open playList
export const openPlayList = (open) => {
  return (dispatch, getState) => {
    dispatch({
      type: OPEN_PLAYLIST,
      data: open,
    });
  };
};